<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:f="http://java.sun.com/jsf/core" template="template.xhtml">

	<ui:define name="title">Bidman - Leilão Inverso</ui:define>
	<ui:define name="pesquisa">
		<div style="float: left; padding-left: 20px">
			<div style="position: relative; float: left;">
				<p:inputText id="busca" styleClass="header"
					style="margin-right:10px; width:250px" label="Busca"
					value="#{editalController.searchString}">
				</p:inputText>
				<p:watermark for="busca" value="Procure por produtos e serviços" />
				<p:commandButton height="15px" value="Busca"
					action="#{editalController.buscaEdital}" icon="ui-icon-search"
					update=":editais">
				</p:commandButton>
			</div>
		</div>
	</ui:define>
	<ui:define name="conteudo">
		<h:form prependId="false" id="form">
		<p:growl autoUpdate="true"/>
		<div style="overflow: hidden">
							<ui:repeat var="edital" value="#{editalController.editaisTela}">
					<p:panel header="#{edital.getData_fimFormatada()}"
						styleClass="edital" style="text-align:center">
						<h:outputText value="#{edital.titulo}" style="font-weight: bold;" />
						<br></br>
						<h:outputText value="#{edital.produtoServico.descricao}" />
						<hr
							style="border: 0; border-bottom: 1px dashed #ccc; background: #999;" />
						<img src="#{request.contextPath}/images/#{edital.getImage()}"
							style="width: 500px; height: 200px" />
						<br />
						<br />
						<p:commandButton action="#{lanceController.setEdital(edital)}"
							value="" ajax="false" styleClass="lances_embreve"
							rendered="#{edital.isEmBreve()}" />
							<h:column rendered="#{edital.ativo}">
								<p:commandButton action="#{lanceController.setEdital(edital)}"
									value="" ajax="false" styleClass="lances_aberto"
									rendered="#{edital.isEmBreve() == false}" />
							</h:column>
						<p:commandButton action="#{lanceController.setEdital(edital)}"
							value="" ajax="false" styleClass="lances_encerrado"
							rendered="#{edital.ativo == false}" />
					</p:panel>
				</ui:repeat>
			</div>
		</h:form>
		
	</ui:define>
</ui:composition>


